package storagex

var storageCli Storage

func InitStorage(cfg Config) (err error) {
	storageCli, err = NewStorage(cfg)
	return
}

func Ticket() string {
	return storageCli.Ticket()
}

func TicketWithOverride(remoteKey string) string {
	return storageCli.TicketWithOverride(remoteKey)
}

func UploadFile(remoteKey, localFile string, override bool) (string, error) {
	return storageCli.UploadFile(remoteKey, localFile, override)
}

func UploadBytes(remoteKey string, fBytes []byte, override bool) (string, error) {
	return storageCli.UploadBytes(remoteKey, fBytes, override)
}

func UploadBigFile(remoteKey, localFile string, override bool) (string, error) {
	return storageCli.UploadBigFile(remoteKey, localFile, override)
}

func Stat(remoteKey string) (*FileInfo, error) {
	return storageCli.Stat(remoteKey)
}

func Delete(remoteKey string) error {
	return storageCli.Delete(remoteKey)
}

func Move(srcKey, destKey string, force bool) error {
	return storageCli.Move(srcKey, destKey, force)
}

func Copy(srcKey, destKey string, force bool) error {
	return storageCli.Copy(srcKey, destKey, force)
}

func MakePublicKey(remoteKey string) string {
	return storageCli.MakePublicKey(remoteKey)
}

func MakePrivateKey(remoteKey string, expires int64) string {
	return storageCli.MakePrivateKey(remoteKey, expires)
}

func List(dir, marker string, limit int) ([]FileInfo, string, error) {
	return storageCli.List(dir, marker, limit)
}
